<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<title>企业贷款申请信息修改</title>
<span id="navlink">企业贷款申请信息修改</span>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/credit/creditApplyEnterprise.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/common/money2chinese.js"></script>
	<div id="msg"></div>
<form action="enterpriseEditSave" method="post" id="form">
	<br />
	<s:div id="left_area">
		<span class="need">*</span>申请单号:<span>RFQ</span><s:textfield name="applyid" value="%{creditapplyenterprise.applyid}" cssClass="readonly" readonly="true"/>
		</s:div>
	<div id="top_area">
			<span class="need">*</span><s:label value="申请日期"/><input name="applydate" id="applydate" value="<s:date name="creditapplyenterprise.applydate" format="yyyy-MM-dd"/>" cssClass="readonly" readonly="true"/>
		</div>
	<table class="table_box table_all_border takecenter">
		<tr>
			<td colspan="2">借款申请人（全称）</td>
			<td colspan="4">${enterpriseInforBean.name}</td>
		</tr>
		<tr>
			<td colspan="2">法定代表人</td>
			<td >${enterpriseInforBean.lawPeople}</td>
			<td colspan="2">联系人</td>
			<td >${enterpriseInforBean.linkman}</td>
		</tr>
		<tr>
			<td colspan="2">住所地</td>
			<td >${enterpriseInforBean.mailingaddress}</td>
			<td colspan="2">联系电话</td>
			<td colspan="1">${enterpriseInforBean.telephone}</td>
		</tr>
		<s:iterator value="lcBankList" status="index" var="var">
			<tr>
			<td  style="width:150px">基本账户开户行</td>
			<td style="width:50px">本币</td>
			<td>${bankname }</td>
			<td  style="width:150px">基本账户号码</td>
			<td style="width:50px">本币</td>
			<td>${saveaccount }</td>
		</tr>
		</s:iterator>
		<tr>
			<td colspan="2">贷款卡号</td>
			<td colspan="4">${enterpriseInforBean.creditcode}</td>
		</tr>
		</table>
		<table class="table_box table_bottom_border takecenter">
		<tr>
			<td style="width:16%">资产总额</td>
			<td><s:if test="enterpriseInforBean==null||enterpriseInforBean.allMoney==null"></s:if><s:else><s:text name="f.money"><s:param value="enterpriseInforBean.allMoney"/></s:text></s:else>(元)</td>
			<td style="width:16%">所有者权益总额</td>
			<td><s:if test="enterpriseInforBean==null||enterpriseInforBean.totalOwnMoney==null"></s:if><s:else><s:text name="f.money"><s:param value="enterpriseInforBean.totalOwnMoney"/></s:text></s:else>(元)</td>
			<td style="width:16%">资产负债率</td>
			<td >${enterpriseInforBean.assetLiabilityRatio}(%)</td>
		</tr>
		<tr>
			<td colspan="2">主要产（商）品</td>
			<td colspan="4">${enterpriseInforBean.mainproducts}</td>
		</tr>
		<tr>
			<td >总产值</td>
			<td><s:if test="enterpriseInforBean==null||enterpriseInforBean.totalValue==null"></s:if><s:else><s:text name="f.money"><s:param value="enterpriseInforBean.totalValue"/></s:text></s:else>(元)</td>
			
			<td>销售收入</td>
			<td><s:if test="enterpriseInforBean==null||enterpriseInforBean.salesRevenue==null"></s:if><s:else><s:text name="f.money"><s:param value="enterpriseInforBean.salesRevenue"/></s:text></s:else>(元)</td>
			<td>利润</td>
			<td><s:if test="enterpriseInforBean==null||enterpriseInforBean.profits==null"></s:if><s:else><s:text name="f.money"><s:param value="enterpriseInforBean.profits"/></s:text></s:else>(元)</td>
		</tr>
	</table>
	<br>
	<table class="table_box table_all_border" id="applytable">
		<tr>
			<th colspan="2">申请贷款情况</th>
		</tr>
		<tr>
			<th style="width:25%"><span class="need">*</span>借款用途</th>
			<td ><s:textfield name="loanuse" id="loanuse"
					value="%{creditapplyenterprise.loanuse}" size="60" /></td>
		</tr>
		<tr>
			<th><span class="need">*</span>贷款期限</th>
			<td><s:textfield name="applytime" value="%{creditapplyenterprise.applytime}"/>
			<s:radio id="applytimetype" name="applytimetype" list="%{#{'年':'年','月':'月','天':'天'}}" value="%{creditapplyenterprise.applytimetype}"/>
			<%--<s:select name="creditapplyenterprise.applytimetype" headerKey="" headerValue="----"
				list="#{'年':'年','月':'月','天':'天' }" cssClass="readonly" value="%{creditapplyenterprise.applytimetype}"/> --%></td>
		</tr>
		<tr>
			<th><span class="need">*</span>借款币种及金额</th>
			<td >￥<s:textfield name="loanaccount"
					id="loanaccount" value="%{creditapplyenterprise.loanaccount}" size="30" maxlength="12" /> 大写RMB<s:textfield name="loanaccountCapital"
					id="loanaccountCapital" value="" size="55" maxlength="35" readonly="true" /></td>
		</tr>
		<tr>
			<th><span class="need">*</span>贷款方式</th>
			<td><s:checkboxlist id="loanofmode" name="loanofmode" list="loantypeList" listKey="type" listValue="typename" value="%{#request.lomList}"/></td>
			</tr>
		<tr>
			<th><span class="need">*</span>是否涉农</th>
			<td><s:radio id="isAboutN" name="isAboutN" list="%{#{'1':'是','0':'否'}}" value="%{creditapplyenterprise.isAboutN}"/></td>
			</tr>
		<tr>
			<th><span class="need">*</span>还款资金来源</th>
			<td><s:textfield name="sourceofrepayment" id="sourceofrepayment" value="%{creditapplyenterprise.sourceofrepayment}" size="60"/></td>
		</tr>
		<tr>
			<th><span class="need">*</span>还款方式</th>
			<td>
			<s:radio id="modeofrepayment" name="modeofrepayment" list="%{#{'1':'一次性偿还','2':'分期偿还','5':'等额本金','6':'等额本息 ','7':'其他 '}}" value="%{creditapplyenterprise.modeofrepayment}"/>
			</td>
		</tr>
	</table>
	<br>

	<table class="table_box table_all_border" id="keepInfor1">
		<tr>
			<th colspan="6">担保情况表</th>
		</tr>
	</table>

	<s:div style="display:none" id="infor1">
		<br>
		<hr>
		<br>
		<table class="table_box table_all_border" id="hypothecate">
			<tr>
				<th>抵押信息</th>
				<th colspan="5"><input type="button" id="addHypothecate"
					value="增加抵押信息" /></th>
			</tr>
			<s:iterator value="hypothecateList" status="index" var="var">
			<tr>
				<th style="width:25%">抵押人（全称）</th><td colspan="5" style="width:75%"> ${peopleName }</td></tr><tr><th style="width:25%">主要抵押物名称</th><td colspan="2" style="width:25%">${thingName }</td><th style="width:5%">现值</th><td style="width:40%">${price }</td><td style="width:5%"><input type="button" value="删除" onClick="getDel(this)"/></td>
			</tr> 
			<tr>
				<th style="width:25%"></th><th colspan="5" style="width:75%" align="left">物品编号:<input type="text" readOnly="readOnly" name="hypothecateHidden" value="${id }">抵押人编号:<input type="text" name="hypothecateHiddenPI" readOnly="readOnly" value="${peopleid }">关系人类型:<s:if test="relationpeopletype==1"><input type="text" name="hypothecateHiddenRPT" readonly="readonly" value="个人"></s:if><s:elseif test="relationpeopletype==2"><input type="text" name="hypothecateHiddenRPT" readonly="readonly" value="企业"></s:elseif> </th>
			</tr>
			</s:iterator>
		</table>
	</s:div>
	<s:div style="display:none;" id="infor2">
		<br>
		<hr>
		<br>
		<table class="table_box table_all_border" id="pledge">
			<tr>
				<th>质押信息</th>
				<th colspan="5"><input type="button" id="addPledge"
					value="增加质押信息" /></th>
			</tr>
			<s:iterator value="pledgeList" status="index" var="var">
			<tr>
				<th style="width:25%">质押人（全称）</th><td colspan="5" style="width:75%"> ${peopleName }</td></tr><tr><th style="width:25%">主要抵押物名称</th><td colspan="2" style="width:25%">${thingName }</td><th style="width:5%">现值</th><td style="width:40%">${price }</td><td style="width:5%"><input type="button" value="删除" onClick="getDel(this)"/></td>
			</tr> 
			<tr>
				<th style="width:25%"></th><th colspan="5" style="width:75%" align="left">物品编号:<input type="text" readOnly="readOnly" name="hypothecateHidden" value="${id }">质押人编号:<input type="text" name="hypothecateHiddenPI" readOnly="readOnly" value="${peopleid }">关系人类型:<s:if test="relationpeopletype==1"><input type="text" name="hypothecateHiddenRPT" readonly="readonly" value="个人"></s:if><s:elseif test="relationpeopletype==2"><input type="text" name="hypothecateHiddenRPT" readonly="readonly" value="企业"></s:elseif> </th>
			</tr>
			</s:iterator>
		</table>
	</s:div>
	<s:div style="display:none;" id="infor3">
		<br>
		<hr>
		<br>
		<table class="table_box table_all_border" id="keepInfor">
			<tr>
				<th>保证信息</th>
				<th colspan="5"><input type="button" id="addKeepInfor"
					value="增加保证信息" /></th>
			</tr>
			<s:iterator value="enssuerList" status="index" var="var">
			<tr>
				<th style="width:25%">保证人（全称）</th><td colspan="5" style="width:75%">${peopleName }</td></tr><tr><th style="width:25%">基本账户开户行</th><th style="width:10%">本币</th><td style="width:25%">${basicBank }</td><th style="width:10%">外币</th><td style="width:25%">${foreginBank }</td><td style="width:5%"><input type="button" value="删除" onClick="getDel(this)"/></td>
			</tr>
			<tr>
				<th style="width:25%"></th><th style="width:10%">保证人编号：</th><td style="width:25%"><input type="text" name="keepInforHidden" readOnly="readOnly" value="${peopleId }"></td><th style="width:10%">关系人类型：</th><td><s:if test="relationpeopletype==1"><input type="text" name="pledgeHiddenRPT" readonly="readonly" value="个人"></s:if><s:elseif test="relationpeopletype==2"><input type="text" name="keepInforHiddenRPT" readonly="readonly" value="企业"></s:elseif> </td>
			</tr>
			</s:iterator>
		</table>
	</s:div>
	<br>
	<hr>
	<br>
	<div id="button_area">
		<input type="submit" id="submit" value="提交" />
		<s:reset value="重置"></s:reset>
		<%--<input type="button" value="取消" />

	--%></div>

</form>
<script type="text/javascript">
<!--
	function getDel(keepInfor){
				$(keepInfor).parent().parent().prev().remove();
				$(keepInfor).parent().parent().next().remove();
				$(keepInfor).parent().parent().remove();
				}
//-->
</script>